package com.zr.model;
// Generated 2016-10-26 14:56:45 by Hibernate Tools 4.3.1.Final

import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * LMdistributionPrice generated by hbm2java
 * 这是配送价格的模型
 */
@Entity
@Table(name = "l_mdistribution_price", catalog = "logistical_managementcrm")
public class LMdistributionPrice implements java.io.Serializable {

	private Integer dpid;
	private LMdistribution LMdistribution;
	private LMdistributionRange LMdistributionRange;
	private BigDecimal kgprice; //每公斤的价格
	private BigDecimal m3price;//每立方米的价格
	private String dptemp;//备用字段

	public LMdistributionPrice() {
	}

	public LMdistributionPrice(LMdistribution LMdistribution, LMdistributionRange LMdistributionRange,
			BigDecimal kgprice, BigDecimal m3price, String dptemp) {
		this.LMdistribution = LMdistribution;
		this.LMdistributionRange = LMdistributionRange;
		this.kgprice = kgprice;
		this.m3price = m3price;
		this.dptemp = dptemp;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "dpid", unique = true, nullable = false)
	public Integer getDpid() {
		return this.dpid;
	}

	public void setDpid(Integer dpid) {
		this.dpid = dpid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "did")
	public LMdistribution getLMdistribution() {
		return this.LMdistribution;
	}

	public void setLMdistribution(LMdistribution LMdistribution) {
		this.LMdistribution = LMdistribution;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "drid")
	public LMdistributionRange getLMdistributionRange() {
		return this.LMdistributionRange;
	}

	public void setLMdistributionRange(LMdistributionRange LMdistributionRange) {
		this.LMdistributionRange = LMdistributionRange;
	}

	@Column(name = "kgprice", precision = 10, scale = 1)
	public BigDecimal getKgprice() {
		return this.kgprice;
	}

	public void setKgprice(BigDecimal kgprice) {
		this.kgprice = kgprice;
	}

	@Column(name = "m3price", precision = 10, scale = 1)
	public BigDecimal getM3price() {
		return this.m3price;
	}

	public void setM3price(BigDecimal m3price) {
		this.m3price = m3price;
	}

	@Column(name = "dptemp")
	public String getDptemp() {
		return this.dptemp;
	}

	public void setDptemp(String dptemp) {
		this.dptemp = dptemp;
	}

}
